Skip to content

build(cloudflare): revert custom worker entrypoint to standard Astro build output - #104

Merged
saifulalomdev merged 1 commit into
mainfrom
features
Jun 17, 2026
Merged

build(cloudflare): revert custom worker entrypoint to standard Astro build output#104
saifulalomdev merged 1 commit into
mainfrom
features

Conversation

@saifulalomdev

Copy link
Copy Markdown
Owner

📝 Description

This PR standardizes the Cloudflare deployment configuration pipeline to resolve architectural runtime and middleware execution issues on the edge.

Key Changes:

  • Astro Config Simplification: Dropped the custom workerEntryPoint tracking pointing to ./src/worker.ts within astro.config.mjs, reverting the Cloudflare adapter back to its native, fully-managed compilation lifecycle mode.
  • Wrangler Entrypoint Correction: Updated the "main" execution entry point inside wrangler.jsonc to correctly target Astro's compiled production bundle pathway (dist/_worker.js/index.js). This aligns the deployment with standard Cloudflare Pages advanced build requirements and eliminates deep routing initialization errors.

Fixes # (issue number)

🧪 Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor / Chore (codebase maintenance or optimization)

🛠️ How Has This Been Tested?

  • Verified that the deployment compilation steps correctly write assets to the automated production directory.

  • Confirmed that standard edge parameters resolve perfectly against the default deployment adapter schema boundaries.

  • Unit/Integration tests added/passed

  • Local manual edge verification successful

📸 Screenshots / Diffs (if applicable)

Modified Files:

  • astro.config.mjs
  • wrangler.jsonc

✅ Checklist

  • My code follows the brutalist/minimal style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new typescript compiler or linter errors

…build output

- Remove custom `workerEntryPoint` path targeting `./src/worker.ts` from `astro.config.mjs`
- Update `wrangler.jsonc` main entrypoint path to point to Astro's compiled production bundle at `dist/_worker.js/index.js`
- Align build configuration with standard Cloudflare Pages advanced deployment requirements to resolve middleware execution conflicts
@saifulalomdev
saifulalomdev merged commit 952a477 into main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant